package com.bf.electroplating.pojo.enums;

import lombok.Getter;

@Getter
public enum InspectionTypeEnum {

    FACILITY("0", "设备"),
    COMPANY("1", "企业"),
    ;

    private final String code;
    private final String desc;

    private InspectionTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDesc(String code) {
        for (InspectionTypeEnum item : InspectionTypeEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getDesc();
            }
        }
        return null;
    }

}
